package com.example.search.service;

import com.example.search.model.Goods;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.Optional;

/**
 * @Auther: nanhuanh
 * @Date: 2019/3/6 16:06
 * @Description:
 */
public interface IGoodsService {

    /**
     * @param id
     * @return
     */
    Optional<Goods> findById(String id);

    Goods save(Goods blog);

    void delete(Goods blog);

    Goods update(Goods blog);

    Optional<Goods> findOne(String id);

    Iterable<Goods> findAll();

    Page<Goods> findByShopName(String shopName, Pageable pageable);

    Page<Goods> findByShopCode(String shopCode, Pageable pageable);

}
